package com.bm.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName ejyy_iot_elevator_log
 */
@TableName(value ="ejyy_iot_elevator_log")
@Data
public class EjyyIotElevatorLog implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 
     */
    private Long wechatMpUserId;

    /**
     * 
     */
    private Long vistorId;

    /**
     * 
     */
    private Long elevatorId;

    /**
     * 1 二维码 2 NFC 3 IC卡
     */
    private Boolean method;

    /**
     * 
     */
    private Long createdAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        EjyyIotElevatorLog other = (EjyyIotElevatorLog) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getWechatMpUserId() == null ? other.getWechatMpUserId() == null : this.getWechatMpUserId().equals(other.getWechatMpUserId()))
            && (this.getVistorId() == null ? other.getVistorId() == null : this.getVistorId().equals(other.getVistorId()))
            && (this.getElevatorId() == null ? other.getElevatorId() == null : this.getElevatorId().equals(other.getElevatorId()))
            && (this.getMethod() == null ? other.getMethod() == null : this.getMethod().equals(other.getMethod()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getWechatMpUserId() == null) ? 0 : getWechatMpUserId().hashCode());
        result = prime * result + ((getVistorId() == null) ? 0 : getVistorId().hashCode());
        result = prime * result + ((getElevatorId() == null) ? 0 : getElevatorId().hashCode());
        result = prime * result + ((getMethod() == null) ? 0 : getMethod().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", wechatMpUserId=").append(wechatMpUserId);
        sb.append(", vistorId=").append(vistorId);
        sb.append(", elevatorId=").append(elevatorId);
        sb.append(", method=").append(method);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}